﻿//-----------------------------------------------------------------------
// <copyright file="HomeController.cs" company="Christian Coda">
// Copyright (c) Christian Coda. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace DancingSite.Controllers
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Mvc;
    using DancingSite.Models;

    /// <summary>
    /// The controller class for the home page.
    /// </summary>
    public class HomeController : Controller
    {
        /// <summary>
        /// the database context
        /// </summary>
        private DanceDBContext db = new DanceDBContext();

        /// <summary>
        /// GET: /Index
        /// </summary>
        /// <returns>The index page.</returns>
        public ActionResult Index()
        {
            ViewBag.Message = "Happening Today...";

            List<Dance> danceList = this.db.Dances.ToList();

            return this.View(danceList);
        }

        /// <summary>
        /// GET: /About
        /// </summary>
        /// <returns>The about page.</returns>
        public ActionResult About()
        {
            ViewBag.Message = "Your app description page.";

            return this.View();
        }

        /// <summary>
        /// GET: /Contact
        /// </summary>
        /// <returns>The contact page.</returns>
        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return this.View();
        }

        /// <summary>
        /// GET: /Dances
        /// </summary>
        /// <returns>The dances page</returns>
        public ActionResult Dances()
        {
            ViewBag.Message = "Dances page.";

            return this.View();
        }
    }
}
